import Vue from "vue";
import App from "./App.vue";
import Cui from "@cci/cui";
import "@cci/cui/lib/theme-default/index.css";
import router from "./router";
import store from "./store";
import * as filters from "./filters";
import mixins from "./mixins";
import VueAwesomeSwiper from "vue-awesome-swiper";
import "swiper/css/swiper.css";
import Video from "video.js";
import 'video.js/dist/video-js.css';
import 'animate.css/animate.min.css';
import "./styles";
import "./fonts";

Vue.use(Cui);
Vue.use(VueAwesomeSwiper);
Vue.prototype.$video = Video;

// import mixins from './mixins'

// 注册全局 mixins
Vue.mixin(mixins);

// 注册过滤器
Object.keys(filters).forEach((key) => {
  Vue.filter(key, filters[key]);
  Vue.prototype.$filters = filters;
});

store.dispatch("GetSystemParmas");

Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");

//解决window.location.origin不存在的问题
if (!window.location.origin) {
  window.location.origin =
    window.location.protocol +
    "//" +
    window.location.hostname +
    (window.location.port ? ":" + window.location.port : "");
}